load("//bazel:build.bzl", "redpanda_cc_library")

redpanda_cc_library(
    name = "compression",
    srcs = [
        "async_stream_zstd.cc",
        "compression.cc",
        "gzip_stream_decompression.cc",
        "internal/gzip_compressor.cc",
        "internal/lz4_frame_compressor.cc",
        "internal/snappy_java_compressor.cc",
        "lz4_decompression_buffers.cc",
        "snappy_standard_compressor.cc",
        "stream_zstd.cc",
    ],
    hdrs = [
        "async_stream_zstd.h",
        "compression.h",
        "gzip_stream_decompression.h",
        "internal/gzip_compressor.h",
        "internal/lz4_frame_compressor.h",
        "internal/snappy_java_compressor.h",
        "internal/zstd_compressor.h",
        "lz4_decompression_buffers.h",
        "snappy_standard_compressor.h",
        "stream_zstd.h",
    ],
    include_prefix = "compression",
    local_defines = ["ZSTD_STATIC_LINKING_ONLY"],
    visibility = ["//visibility:public"],
    deps = [
        "//src/v/base",
        "//src/v/bytes",
        "//src/v/bytes:iobuf",
        "//src/v/model",
        "//src/v/thirdparty/lz4",
        "//src/v/thirdparty/lz4:lz4_frame",
        "//src/v/thirdparty/zlib",
        "//src/v/utils:object_pool",
        "//src/v/utils:static_deleter_fn",
        "@fmt",
        "@seastar",
        "@snappy",
        "@zstd",
    ],
)
